package com.zp.self.javaBase.extend;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * Created by peng.zeng on 2021/5/9 14:03
 */
@Data
@Slf4j
public class Animal {

    public String name;

    public int leg;

    public  Animal(){
        log.info("调用了Animal ---无参构造方法");
        this.name="默认";
        this.leg=2;
    }

    public  Animal(String name ,int leg){
        log.info("调用了Animal ---双参构造方法");
        this.name=name;
        this.leg=leg;
    }

}
